package routers

import (
	"github.com/gin-gonic/gin"
	"shop-admin/controller"
)

func privateArea(router *gin.RouterGroup) {
	api := &controller.AreaController{}
	areaRouter := router.Group("/admin/area")
	{
		areaRouter.GET("/list", api.List)           //获取省市
		areaRouter.GET("/listByPid", api.ListByPid) //通过父级id获取区域列表
		areaRouter.POST("", api.Save)               //保存
		areaRouter.PUT("", api.Update)              //修改
		areaRouter.DELETE("/:areaId", api.Delete)   //删除
	}
}
